<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableLuckCoupon extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('luck_coupon', function (Blueprint $table) {
            $table->id();
            $table->string('name',50)->default('')->comment('抽奖券名');
            $table->integer('number')->unsigned()->default(1)->comment('发放数量');
            $table->integer('activity_id')->unsigned()->default(0)->comment('活动ID');
            $table->timestamps();
        });
        DB::statement('alter table ex_luck_coupon comment "抽奖券表"');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('luck_coupon');
    }
}
